#!/bin/bash

# postinst script for source-system-grub
#
# see: dh_installdeb(1)

#set -e

# summary of how this script can be called:
#        * <postinst> \`configure' <most-recently-configured-version>
#        * <old-postinst> \`abort-upgrade' <new version>
#        * <conflictor's-postinst> \`abort-remove' \`in-favour' <package>
#          <new-version>
#        * <postinst> \`abort-remove'
#        * <deconfigured's-postinst> \`abort-deconfigure' \`in-favour'
#          <failed-install-package> <version> \`removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

PATH=/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export PATH

if [ "${BASEDIR:=/}" = "/" ]; then
    BASEDIR=""
else
    BASEDIR_OPT="-b $BASEDIR"
fi

case "$1" in
    configure)
        chown root:bin $BASEDIR/usr/src/grub
	chown root:bin $BASEDIR/usr/src/grub/docs
	chown root:bin $BASEDIR/usr/src/grub/grub
	chown root:bin $BASEDIR/usr/src/grub/lib
	chown root:bin $BASEDIR/usr/src/grub/netboot
	chown root:bin $BASEDIR/usr/src/grub/stage1
	chown root:bin $BASEDIR/usr/src/grub/stage2
	chown root:bin $BASEDIR/usr/src/grub/stage2/zfs-include
	chown root:bin $BASEDIR/usr/src/grub/util
	chmod 0644 "$BASEDIR/usr/src/grub/AUTHORS"
	chown root:bin "$BASEDIR/usr/src/grub/AUTHORS"
	chmod 0644 "$BASEDIR/usr/src/grub/BUGS"
	chown root:bin "$BASEDIR/usr/src/grub/BUGS"
	chmod 0644 "$BASEDIR/usr/src/grub/COPYING"
	chown root:bin "$BASEDIR/usr/src/grub/COPYING"
	chmod 0644 "$BASEDIR/usr/src/grub/ChangeLog"
	chown root:bin "$BASEDIR/usr/src/grub/ChangeLog"
	chmod 0644 "$BASEDIR/usr/src/grub/INSTALL"
	chown root:bin "$BASEDIR/usr/src/grub/INSTALL"
	chmod 0644 "$BASEDIR/usr/src/grub/MAINTENANCE"
	chown root:bin "$BASEDIR/usr/src/grub/MAINTENANCE"
	chmod 0644 "$BASEDIR/usr/src/grub/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/NEWS"
	chown root:bin "$BASEDIR/usr/src/grub/NEWS"
	chmod 0644 "$BASEDIR/usr/src/grub/README"
	chown root:bin "$BASEDIR/usr/src/grub/README"
	chmod 0644 "$BASEDIR/usr/src/grub/THANKS"
	chown root:bin "$BASEDIR/usr/src/grub/THANKS"
	chmod 0644 "$BASEDIR/usr/src/grub/TODO"
	chown root:bin "$BASEDIR/usr/src/grub/TODO"
	chmod 0644 "$BASEDIR/usr/src/grub/acinclude.m4"
	chown root:bin "$BASEDIR/usr/src/grub/acinclude.m4"
	chmod 0644 "$BASEDIR/usr/src/grub/aclocal.m4"
	chown root:bin "$BASEDIR/usr/src/grub/aclocal.m4"
	chmod 0644 "$BASEDIR/usr/src/grub/config.h.in"
	chown root:bin "$BASEDIR/usr/src/grub/config.h.in"
	chmod 0644 "$BASEDIR/usr/src/grub/configure.ac"
	chown root:bin "$BASEDIR/usr/src/grub/configure.ac"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/docs/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/docs/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/boot.S"
	chown root:bin "$BASEDIR/usr/src/grub/docs/boot.S"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/boot.S.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/boot.S.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub-install.8"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub-install.8"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub-md5-crypt.8"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub-md5-crypt.8"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub-terminfo.8"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub-terminfo.8"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.8"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.8"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.info"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.info"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.info-1"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.info-1"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.info-2"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.info-2"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.info-3"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.info-3"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.info-4"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.info-4"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/grub.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/grub.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/help2man"
	chown root:bin "$BASEDIR/usr/src/grub/docs/help2man"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/internals.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/internals.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/kernel.c"
	chown root:bin "$BASEDIR/usr/src/grub/docs/kernel.c"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/kernel.c.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/kernel.c.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/mbchk.1"
	chown root:bin "$BASEDIR/usr/src/grub/docs/mbchk.1"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/mdate-sh"
	chown root:bin "$BASEDIR/usr/src/grub/docs/mdate-sh"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/menu.lst"
	chown root:bin "$BASEDIR/usr/src/grub/docs/menu.lst"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/multiboot.h"
	chown root:bin "$BASEDIR/usr/src/grub/docs/multiboot.h"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/multiboot.h.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/multiboot.h.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/multiboot.info"
	chown root:bin "$BASEDIR/usr/src/grub/docs/multiboot.info"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/multiboot.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/multiboot.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/src2texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/src2texi"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/stamp-vti"
	chown root:bin "$BASEDIR/usr/src/grub/docs/stamp-vti"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/texinfo.tex"
	chown root:bin "$BASEDIR/usr/src/grub/docs/texinfo.tex"
	chmod 0644 "$BASEDIR/usr/src/grub/docs/version.texi"
	chown root:bin "$BASEDIR/usr/src/grub/docs/version.texi"
	chmod 0644 "$BASEDIR/usr/src/grub/grub/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/grub/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/grub/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/grub/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/grub/asmstub.c"
	chown root:bin "$BASEDIR/usr/src/grub/grub/asmstub.c"
	chmod 0644 "$BASEDIR/usr/src/grub/grub/main.c"
	chown root:bin "$BASEDIR/usr/src/grub/grub/main.c"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/lib/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/lib/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/device.c"
	chown root:bin "$BASEDIR/usr/src/grub/lib/device.c"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/device.h"
	chown root:bin "$BASEDIR/usr/src/grub/lib/device.h"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/getopt.c"
	chown root:bin "$BASEDIR/usr/src/grub/lib/getopt.c"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/getopt.h"
	chown root:bin "$BASEDIR/usr/src/grub/lib/getopt.h"
	chmod 0644 "$BASEDIR/usr/src/grub/lib/getopt1.c"
	chown root:bin "$BASEDIR/usr/src/grub/lib/getopt1.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/3c595.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/3c595.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/3c595.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/3c595.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/3c90x.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/3c90x.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/README.netboot"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/README.netboot"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/basemem.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/basemem.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/big_bswap.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/big_bswap.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/bootp.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/bootp.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/byteswap.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/byteswap.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/config.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/config.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/cpu.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/cpu.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/davicom.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/davicom.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/dev.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/dev.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/e1000.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/e1000.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/e1000_hw.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/e1000_hw.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/eepro100.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/eepro100.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/elf.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/elf.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/endian.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/endian.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/epic100.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/epic100.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/epic100.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/epic100.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/etherboot.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/etherboot.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/forcedeth.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/forcedeth.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/fsys_tftp.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/fsys_tftp.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/grub.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/grub.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/i386_byteswap.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/i386_byteswap.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/i386_elf.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/i386_elf.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/i386_endian.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/i386_endian.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/i386_timer.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/i386_timer.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/if_arp.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/if_arp.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/if_ether.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/if_ether.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/igmp.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/igmp.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/in.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/in.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/io.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/io.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/ip.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/ip.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/isa.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/isa.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/latch.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/latch.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/little_bswap.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/little_bswap.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/mii.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/mii.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/misc.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/misc.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/natsemi.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/natsemi.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/nfs.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/nfs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/nic.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/nic.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/nic.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/nic.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/ns83820.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/ns83820.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/ns8390.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/ns8390.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/ns8390.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/ns8390.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/osdep.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/osdep.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pci.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pci.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pci.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pci.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pci_ids.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pci_ids.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pci_io.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pci_io.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pcnet32.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pcnet32.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pic8259.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pic8259.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pic8259.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pic8259.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pnic.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pnic.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pnic_api.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pnic_api.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/pxe.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/pxe.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/r8169.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/r8169.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/rtl8139.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/rtl8139.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/segoff.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/segoff.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/sis900.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/sis900.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/sis900.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/sis900.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/sundance.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/sundance.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tftp.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tftp.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tg3.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tg3.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tg3.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tg3.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/timer.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/timer.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/timer.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/timer.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tlan.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tlan.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tlan.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tlan.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/tulip.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/tulip.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/udp.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/udp.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/undi.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/undi.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/undi.h"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/undi.h"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/via-rhine.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/via-rhine.c"
	chmod 0644 "$BASEDIR/usr/src/grub/netboot/w89c840.c"
	chown root:bin "$BASEDIR/usr/src/grub/netboot/w89c840.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage1/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/stage1/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/stage1/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/stage1/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/stage1/stage1.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage1/stage1.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage1/stage1.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage1/stage1.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/apic.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/apic.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/apm.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/apm.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/asm.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/asm.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/bios.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/bios.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/boot.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/boot.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/builtins.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/builtins.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/char_io.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/char_io.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/cmdline.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/cmdline.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/common.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/common.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/console.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/console.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/defs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/defs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/dir.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/dir.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/disk_inode.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/disk_inode.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/disk_inode_ffs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/disk_inode_ffs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/disk_io.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/disk_io.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/expand.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/expand.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/expand.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/expand.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fat.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fat.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/filesys.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/filesys.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/freebsd.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/freebsd.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_ext2fs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_ext2fs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_fat.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_fat.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_ffs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_ffs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_iso9660.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_iso9660.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_jfs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_jfs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_minix.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_minix.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_reiserfs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_reiserfs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_ufs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_ufs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_ufs2.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_ufs2.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_vstafs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_vstafs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_xfs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_xfs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_zfs.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_zfs.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/fsys_zfs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/fsys_zfs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/graphics.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/graphics.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/graphics.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/graphics.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/gunzip.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/gunzip.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/hercules.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/hercules.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/hercules.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/hercules.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/i386-elf.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/i386-elf.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/imgact_aout.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/imgact_aout.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/iso9660.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/iso9660.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/jfs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/jfs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/mb_header.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/mb_header.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/mb_info.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/mb_info.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/md5.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/md5.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/md5.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/md5.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/moddiv.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/moddiv.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/nbi.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/nbi.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/nbloader.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/nbloader.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/pc_slice.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/pc_slice.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/pxeloader.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/pxeloader.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/serial.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/serial.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/serial.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/serial.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/setjmp.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/setjmp.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/shared.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/shared.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/size_test"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/size_test"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/smp-imps.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/smp-imps.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/smp-imps.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/smp-imps.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/stage1_5.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/stage1_5.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/stage2.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/stage2.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/start.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/start.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/start_eltorito.S"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/start_eltorito.S"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/term.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/term.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/terminfo.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/terminfo.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/terminfo.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/terminfo.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/tparm.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/tparm.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/tparm.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/tparm.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/ufs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/ufs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/ufs2.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/ufs2.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/vstafs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/vstafs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/xfs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/xfs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/dmu.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/dmu.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/dmu_objset.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/dmu_objset.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/dnode.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/dnode.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/dsl_dataset.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/dsl_dataset.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/dsl_dir.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/dsl_dir.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/spa.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/spa.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/uberblock_impl.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/uberblock_impl.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/vdev_impl.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/vdev_impl.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zap_impl.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zap_impl.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zap_leaf.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zap_leaf.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs_acl.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs_acl.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs_znode.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zfs_znode.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zil.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zil.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zio.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zio.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs-include/zio_checksum.h"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs-include/zio_checksum.h"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs_fletcher.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs_fletcher.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs_lz4.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs_lz4.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs_lzjb.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs_lzjb.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stage2/zfs_sha256.c"
	chown root:bin "$BASEDIR/usr/src/grub/stage2/zfs_sha256.c"
	chmod 0644 "$BASEDIR/usr/src/grub/stamp-h.in"
	chown root:bin "$BASEDIR/usr/src/grub/stamp-h.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/Makefile.am"
	chown root:bin "$BASEDIR/usr/src/grub/util/Makefile.am"
	chmod 0644 "$BASEDIR/usr/src/grub/util/Makefile.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/Makefile.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/grub-image.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/grub-image.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/grub-install.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/grub-install.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/grub-md5-crypt.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/grub-md5-crypt.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/grub-set-default.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/grub-set-default.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/grub-terminfo.in"
	chown root:bin "$BASEDIR/usr/src/grub/util/grub-terminfo.in"
	chmod 0644 "$BASEDIR/usr/src/grub/util/mbchk.c"
	chown root:bin "$BASEDIR/usr/src/grub/util/mbchk.c"
	chmod 0644 "$BASEDIR/usr/src/grub/util/mkbimage"
	chown root:bin "$BASEDIR/usr/src/grub/util/mkbimage"
	chmod 0755 "$BASEDIR/usr/src/grub/compile"
	chown root:bin "$BASEDIR/usr/src/grub/compile"
	chmod 0755 "$BASEDIR/usr/src/grub/config.guess"
	chown root:bin "$BASEDIR/usr/src/grub/config.guess"
	chmod 0755 "$BASEDIR/usr/src/grub/config.sub"
	chown root:bin "$BASEDIR/usr/src/grub/config.sub"
	chmod 0755 "$BASEDIR/usr/src/grub/configure"
	chown root:bin "$BASEDIR/usr/src/grub/configure"
	chmod 0755 "$BASEDIR/usr/src/grub/depcomp"
	chown root:bin "$BASEDIR/usr/src/grub/depcomp"
	chmod 0755 "$BASEDIR/usr/src/grub/install-sh"
	chown root:bin "$BASEDIR/usr/src/grub/install-sh"
	chmod 0755 "$BASEDIR/usr/src/grub/missing"
	chown root:bin "$BASEDIR/usr/src/grub/missing"
	chmod 0755 "$BASEDIR/usr/src/grub/mkinstalldirs"
	chown root:bin "$BASEDIR/usr/src/grub/mkinstalldirs"
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument '$1'" >&2
        exit 1
    ;;
esac



# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

